package cn.tedu.boot32.mapper;

import cn.tedu.boot32.entity.Emp;
import cn.tedu.boot32.entity.Hero;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface HeroMapper {
    @Insert("insert into hero values (null,#{name},#{type},#{money})")
    void Insert(Hero hero);

    @Select("select *from hero")
    List<Hero> select();

    @Update("update hero set name=#{name},type=#{type},money=#{money} where id=#{id}")
    void update(Hero hero);

    @Delete("delete from hero where id=#{id}")
    void delete(int id);

}
